/*
 * @Author: 缄默
 * @Date: 2022-03-11 21:54:06
 * @LastEditors: 缄默
 * @LastEditTime: 2022-03-11 22:11:49
 */

//判断两个字符串是否互为旋转词

#include <iostream>
#include <vector>
#include <string>

using namespace std;

bool isRotation(string& s1, string& s2);
//KMP算法
int getIndexOf(string& s1, string& s2);
int main() {
        string s1 = "abcd";
    string s2 = "dcba";
    cout << isRotation(s1, s2) << endl;
    return 0;
    return 0;
}

bool isRotation(string& s1, string& s2) {
    if (s1.size() == 0 || s2.size() == 0 || s1.size() != s2.size()) return false;
    string s3 = s2 + s2;
    return getIndexOf(b2, a) != -1;
}

int getIndexOf(string& s1, string& s2) {
    //TODO KMP算法实现
}
